package com.teamone.etl.admin.controller;

import com.baomidou.mybatisplus.extension.api.R;
import com.teamone.etl.admin.feign.SystemSettingWebService;
import com.teamone.etl.dto.LoginClass;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description 
 * @Author WangZhuoRan
 * @Email  2908540863@qq.com
 * @Create 2021-01-24 19:40
 * @Program star-etl
 */
@RestController
@RequestMapping("/admin/systemsetting")
public class SystemSettingWebController {

    @Resource
    private SystemSettingWebService systemSettingWebService;

    @Resource
    private HttpServletRequest request;

    /**
     * 用户登录
     *
     * @param loginClass 接收对象
     * @return true false
     */
    @PostMapping("/loginUser")
    public R loginUser(@RequestBody LoginClass loginClass) {
        System.out.println("web-session-id-"+request.getSession().getId());
        return systemSettingWebService.loginUser(loginClass);
    }

}
